/****** Object:  Stored Procedure [dbo].spPhieuXuatUpdate Script Date: 6/12/2012 ******/
IF EXISTS (SELECT * FROM dbo.sysobjects WHERE id = object_id(N'[dbo].[spPhieuXuatUpdate]') AND OBJECTPROPERTY(id, N'IsProcedure') = 1)
	DROP PROCEDURE [dbo].[spPhieuXuatUpdate]
GO

/******************************************************************************
**		Change History
*******************************************************************************
**		Date:		Author:					Description:
**		--------	--------				-----------------------------------
**		19/06/2012	SongTM					Innit created
*******************************************************************************/

CREATE PROCEDURE [dbo].[spPhieuXuatUpdate]
(
	@SoPX nvarchar(14),
	@NgayXuatKho datetime,
	@NguoiXuat nvarchar(35),
	@NgayLapPhieu datetime,
	@NguoiLap nvarchar(35),
	@SoHD nvarchar(12),
	@LyDoXuat nvarchar(50),
	@GhiChu nvarchar(100),
	@MaKH nvarchar(6),
	@MaKho nvarchar(5)
)

WITH ENCRYPTION

AS

SET NOCOUNT ON

UPDATE [tbl_PhieuXuat]
SET [NgayXuatKho] = @NgayXuatKho,
	[NguoiXuat] = @NguoiXuat,
	[NgayLapPhieu] = @NgayLapPhieu,
	[NguoiLap] = @NguoiLap,
	[SoHD] = @SoHD,
	[LyDoXuat] = @LyDoXuat,
	[GhiChu] = @GhiChu,
	[MaKH] = @MaKH,
	[MaKho] = @MaKho
WHERE	[SoPX] = @SoPX
GO

--GRANT EXECUTE ON [dbo].[spPhieuXuatUpdate] TO [sa]
--GO
